home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / func_in.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  487 b   |  20 lines  |  [TEXT/ttxt]

  1. #
  2. # test of IN (NULL)
  3. #
  4.  
  5. CREATE TABLE t1 (field char(1));
  6. INSERT INTO t1 VALUES ('A'),(NULL);
  7. SELECT * from t1 WHERE field IN (NULL);
  8. SELECT * from t1 WHERE field NOT IN (NULL);
  9. SELECT * from t1 where field = field;
  10. SELECT * from t1 where field <=> field;
  11. DELETE FROM t1 WHERE field NOT IN (NULL);
  12. SELECT * FROM t1;
  13. drop table t1;
  14.  
  15. create table t1 (id int(10) primary key);
  16. insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9);
  17. select * from t1 where id in (2,5,9);
  18. drop table t1;
  19.  
  20.